home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
User's Choice Windows CD
/
User's Choice Windows CD (CMS Software)(1993).iso
/
misc1
/
muzidex2.zip
/
START.SBP
< prev
next >
Wrap
Text File
|
1992-02-28
|
16KB
|
864 lines
SBP
╜ MuZidex - Copyright POD Associates Inc. January 5, 1992
╜
╜ Last Update: 02/25/1992
╜
╜ Database Design:
╜
╜ Jim Brandvold
╜
╜ Programmers:
╜
╜ Jim Brandvold
mloop: ╜ Main Loop & Menu item selection
│ _ wferror
╜
╜ Inputs : return_to%, err%
╜ Outputs: NONE
╜
╜ This routine controls access to the rest of the program.
╜ The first time through return_to% will be initialized by the system to 0
╜ so sinit will be called to set up initial parameters. Sinit then sets
╜ return_to% to 1 (1=Local return) (>1=Chain return) for the next pass.
╜ To allow files to be "CHAINed" to this one, before calling CHAIN set
╜ the variable return_to% to a return value > 1, then modify the following
╜ "ON return_to% GOTO routinename ..." statement to reflect the new routine
╜ label. The routine that is returned to should set return_to = 1. Chained
╜ routines should trap their own errors but only set err% = ERRNO and chain back
╜ to this routine. Modify ferror to handle the errors expected.
╜
í(err% 0) p wferror
▀ e
í(return_to% 1) p
╜ Returning from another routine
í( £ banner$) (return_to% 1) p ┤ £banner$
íreturn_to% 1 p
vsmenu
^
│return_to% wsmenu,VEB,AlbumEntryH,SongEntryH,AlbumQueryH,SongQueryH,WideAreaH
Æ í
^
╜ First Time Through
í σsys(7)
400 pvga$ "n" ^vga$ "y"
ívga$ "y" pbanner$ "Music" ^banner$ "Music"
vsinit
Æ í
¼ │ma%,mb%
╩ ╦"Select pulldown menu option"
╩ ƒ"MuZidex"
╪ Oma%
╜ IF h2% <> MINS ( NOW ) THEN GOSUB shead
┘
íma%
5 p ¼ à
│ma% wm1,m2,m3,m4
sinit: ╜ Initialize first time thru
ç
Γ e
╩ ƒ"A POD Product"
╩ ┬ ƒ"A POD Product"
╩ ╦"A POD Product"
¼ à
┤ £"music1"
╧ ¢15
╧ ▀
song% 0
song_date% 1
return_to% 1
datsm% 1955
datlg% 1992
sonsm% 0
sonlg% 30
qury% 0
albumt% 0
albumq% 0
songt% 0
songq% 0
CD% 1
Recrd% 1
Cassette% 1
Video% 1
EightTrack% 1
ReelToReel% 1
Γ e
special$ "AC/DCHighway To Hell"
ï"dd/mm/yyyy"
ï"hh:mm:ss"
å t: ╩ f │: ╦ │: ▓"999990.00000"
╩ ƒ"MuZidex"
╩ ╦"Initializing Application..."
╩ ┬ ƒ"MuZidex"
¼ à
┤ £banner$
smenu: ╜ Define Pulldown Menus
¼1,0,1,"&Data Entry"
¼1,1,1,"&Enter Data"
¼2,0,1,"&Query"
¼2,1,1,"Search For A &Song"
¼2,2,1,"Search For A &Group"
¼2,3,1,"Search For An &Album"
¼2,4,1,"&Wide Area Search"
¼2,5,1,"&Print Database"
¼3,0,1,"E&xit"
¼3,1,1,"&Quit"
¼4,0,1,"&Help"
¼4,1,1,"&Index"
¼4,2,1,"&General Information"
¼4,3,1,"&Data Entry"
¼4,4,1,"&Album Data Entry"
¼4,5,1,"&Song Data Entry"
¼4,6,1,"Data &Query"
¼4,7,1,"&Group/Album Searches"
¼4,8,1,"S&ong Searches"
¼4,9,1,"&Wide Area Searches"
¼4,10,1,"------------------------------------"
¼4,11,1,"A&bout MuZidex"
├
shead:
╩ ƒ"MuZidex"
├
m1: ╜ ma%= 1 Database Menu Options
selkey$ "":selkey% 0
wVEB
m2: ╜ ma%=2 Data Query
╩ ƒ"MuZidex Query Tool"
╩ ╦"Continue or Cancel"
qury% 1
ímb% 2 p
mb% mb% 1
AlbmQ% 1
^
AlbmQ% 0
Æ í
╔ µmb%
µ1:
SongQRet:
┤ Ö"songs"
songt% A("songs")
╜ SELECT WHERE ASK *** Not User Friendly Replaced with following code
┬"Enter the SONG name","OR a PORTION of the name",4,ret%,SongNameRet$
íret% 0 p wmloop
SngQury$ "*" SongNameRet$ "*"
╔ ╨song_name SngQury$
songq% 0
╔ `
╪ O B("songs")
songq% songq% 1
╔ ▒
┘
ísongq% 0 p
┬"No Records selected!","Do you want to try again?",130,ans%
å Ö"songs"
íans% 1 p
wSongQRet
^
wmloop
Æ í
Æ í
╔ `
┤ Ö"audio"
special3$ special_field.songs
╔ ╨special_field.audio special3$
╔ ` Ö"audio"
AlbumName$ album_name.audio
GroupName$ group_name.audio
recordnumber% 1
┤ £"songqu"
sel% 0
╪sel% 0
╧ ▀
ísel% 0 p
special3$ special_field.songs
╔ ╨ Ö"audio"special_field.audio special3$
╔ ` Ö"audio"
AlbumName$ album_name.audio
GroupName$ group_name.audio
£ ╚
Æ í
┘
å Ö"audio"
å Ö"songs"
µ2:
AlbumQRet:
┤ Ö"audio"
albumt% A("audio")
╜ SELECT WHERE ASK OUser Friendly Replaced with following code
íAlbmQ% 1 p
┬"Enter the ALBUM name","OR a PORTION of the name",4,ret%,AlbumNameRet$
íret% 0 p wmloop
AlbmQury$ "*" AlbumNameRet$ "*"
╔ ╨album_name AlbmQury$
^
┬"Enter the GROUP name","OR a PORTION of the name",4,ret%,AlbumNameRet$
íret% 0 p wmloop
AlbmQury$ "*" AlbumNameRet$ "*"
╔ ╨group_name AlbmQury$
Æ í
albumq% 0
recordnumber% 1
┤ Ö"audio"
╔ `
╪ O B("audio")
albumq% albumq% 1
╔ ▒
┘
íalbumq% 0 p
┬"No Records selected!","Do you want to try again?",130,ans%
å Ö"audio"
íans% 1 p
wAlbumQRet
^
wmloop
Æ í
Æ í
┤ £"albumqu"
╔ `
£ ╚
sel% 0
╪sel% 0
╧ ▀
┘
å Ö"audio"
µ3:
WideAreaH:
return_to% 1
┤ £"SetQuery"
sel% 0
quryreturn:
╪sel% 0
╧ ▀
┘
µ4: ╜ Print
┤ £"printer"
sel% 1
┬"Feature not available in Shareware Version","Register Today!",139
wmloop
Æ ╔
qury% 0
wmloop
m3: ╜ ma%=3 Exit
│mb% wm31
m31: ╜ OR Exit
╩ ┬ ƒ"Exit MuZidex"
┬"Confirm Exit...","",148,n%
ín% 0 wmloop
å t: ╩ ƒ"": ╩ ┬ ƒ"": ╗
m4: ╜ ma=4% Help
sel% 0
selector% mb%
HelpLoop: ╜ entry point for context sensitive help
╔ µselector%
µ1:
┤ £"helpidx"
µ2: ╜ General Information
┤ £"helpgi"
µ3: ╜ Data Entry
┤ £"helpde"
µ4: ╜ Album Entry
┤ £"helpae"
µ5: ╜ Song Entry
┤ £"helpse"
µ6: ╜ Data Query
┤ £"helpdq"
µ7: ╜ Album Search
┤ £"helpaq"
µ8: ╜ song search
┤ £"helpsq"
µ9: ╜ Wide Area Search
┤ £"helpwa"
µ10: ╜ Dummy Line
wmloop
µ11: ╜ About MuZidex
┤ £"about"
Æ ╔
╪(sel% 0) (sel% 1)
í(sel% 1) p
sel% 0
£2
Æ í
╧ ▀
┘
HelpExit:
wmloop
AlbumEntryH: ╜ Return label for help
return_to% 1
┤ £"albumde.sbv"
╔ ╨special_field special$
╔ `
£ ╚
╔ ╨
wfloop
VEB: ╜ View, Edit, Browse
▓"999990.00000"
Album% 0
f$ "Audio":fkey$ "group_Name":fmd$ "AlbumDE":fmp$ "stkc2"
┤ Öf$
úfkey$
í £ fmd$ p ┤ £fmd$
ind$ ú
╜ GOSUB sset
╩ ƒ"MuZidex DataBase Access"
╜ File Forms have command only on page 1 to select form on selkey
╜ FORM 2
£ ╚
Γ e
wfwait
floop:
╜ GOSUB sset
╜ GOSUB ssearch
╬
fwait: ╜ wait here for pushbutton
ed% 1
╩ ╦"Select a pushbutton option"
╧ ▀
wfwait
fedit: ╜ Edit Pushbutton
╜ DEBUG ON ,100
╩ ╦"Use TAB or click on field to be edited. ESC when done."
▀ │
íqury% 1 p wfeditqury
┬"Do you want a COPY of this record?","Selecting No will modify THIS record.",130,a%
ía% 1 p
ü ]
Æ í
editloop:
╔ µsong%
µ0:
ía% 1 p
album_name "New Name"
öalbum_name,0
íalbum_name "New Name" p
┬"You MUST change the ID field.","",2
weditloop
Æ í
^
specialFirst$ special_field
öalbum_name,0
Æ í
µ1:
ía% 1 p
song_name "New Name"
ösong_name,0
ísong_name "New Name" p
┬"You MUST change the ID field.","",2
weditloop
Æ í
íSong_Length 0 p
song_Length 8("0.0.0")
Æ í
^
ösong_name,0
íSong_Length 0 p
song_Length 8("0.0.0")
Æ í
Æ í
Æ ╔
wfedit2
feditqury:
ösong_name qAlbum_name
fedit2:
▀ e
┬"Is entry correct?",""134,a%
ía% 1 p
╠: ╜ Stores edited data
í(song% 0) (qury% 0) p
specialNew$ special_field.audio
íspecialNew$ specialFirst$ p
┤ Ö"songs"
═special_field.songs specialNew$
╨special_field.songs specialFirst$
Æ ═
å Ö"songs"
Æ í
Æ í
^ ía% 0 p
▀ │
╔ £ Y: ╜ Re-display form as before edit
^ ía% 2 p
a% 0
▀ │
weditloop
Æ í
ísong% 1 p
╔ ╨special_field special$
╔ `
^
╔ `
Æ í
íqury% 1 p wquryreturn
wfloop
fenter: ╜ New Entry Pushbutton
│ _ wferror
╩ ƒ"Add To MuZidex"
£2
╩ ╦"Enter data for new record. ESC when done."
AE1: ╜ Actual guts of the Add routine. Checks for a blank form for an
╜ end-of-entry
ü £
╬
editloop2:
▀ │
╔ µsong%
µ0:
öalbum_name,0
µ1:
special_field special$
ösong_name,0
íSong_Length 0 p
song_Length 8("0.0.0")
Æ í
Æ ╔
▀ e
b% 0
┬"Is entry correct?","",134,a%
ía% 1 p
╠ £
╔ £ Y
┬"Continue with data entry?","",130,b%
^ ía% 2 p
weditloop2
^ ía% 0 p
╔ £ Y
Æ í
íb% 1 p wAE1
ísong% 1 p
╔ ╨special_field special$
╔ `
^
╔ `
Æ í
wfloop
fdelete: ╜ Delete Pushbutton
╩ ╦"WARNING! Data will be lost."
▀ e
ísong% 0 p
┬"Do you REALLY want to delete this Album?","This operation will also remove the songs associated with this album!",143,a%
special$ special_field.audio
┤ Ö"songs"
╛ a Ö"songs" ╨special_field.songs special$
å Ö"songs"
^
┬"Do you REALLY want to delete this Song?","",143,a%
Æ í
ía% 1 p
▀ │
╔ ╛
╔ £ `: ╜ Display first record.
^
╔ £ Y: ╜ Re-display form as before delete.
Æ í
ísong% 1 p
╔ ╨special_field special$
╔ `
^
╔ `
Æ í
wfloop
findex: ╜ allow user to adjust index for browsing
╩ ╦"Select new Index for Browsing"
▀ │
┬"Select new index","",7,ret%,ret$
íret$ "" p úret$
ísong% 1 p
╔ ╨special_field special$
╔ `
^
╔ `
Æ í
wfloop
fsongs: ╜ set up songs
SongEntryH: ╜ Return label for help
return_to% 1
┤ Ö"songs"
úSong_Number
╔ ╨special_field special$
╔ `
┤ £"songde"
wfloop
fsongexit: ╜ Exit from Song FORM and get the current record
song% 0
┤ £"albumde.sbv"
╔ ╨special_field special$
╔ `
£ ╚
╔ ╨
wfloop
Fsearch: ╜ Setup and run query
recordnumber% 1
▀ e
í J("tempqury.sbf") p
ì("tempqury.sbf")
Æ í
í(Rock% Classical% Country% Blues% Jazz% Pop% Comedy% Ragge% Soundtrack% NewAge% NewWave% Other% Childrens% Religious% Christmas%) 0 p
▀ │
┬"You MUST select AT LEAST one Music Type","",139
wquryreturn
Æ í
í(CD% Recrd% Cassette% Video% EightTrack% ReelToReel%) 0 p
▀ │
┬"You MUST select AT LEAST one Storage Media","",139
wquryreturn
Æ í
íRock% 1 p
S1$ "Rock-N-Roll"
^
S1$ "XXXX"
Æ í
íClassical% 1 p
S2$ "Classical"
^
S2$ "XXXX"
Æ í
íCountry% 1 p
S3$ "Country"
^
S3$ "XXXX"
Æ í
íBlues% 1 p
S4$ "Blues"
^
S4$ "XXXX"
Æ í
íJazz% 1 p
S5$ "Jazz"
^
S5$ "XXXX"
Æ í
íPop% 1 p
S6$ "Pop"
^
S6$ "XXXX"
Æ í
íRagge% 1 p
S7$ "Ragge"
^
S7$ "XXXX"
Æ í
íSoundtrack% 1 p
S8$ "Soundtrack"
^
S8$ "XXXX"
Æ í
íComedy% 1 p
S9$ "Comedy"
^
S9$ "XXXX"
Æ í
íNewAge% 1 p
SA$ "New Age"
^
SA$ "XXXX"
Æ í
íNewWave% 1 p
SB$ "New Wave"
^
SB$ "XXXX"
Æ í
íOther% 1 p
SC$ "Other"
^
SC$ "XXXX"
Æ í
íChildrens% 1 p
SE$ "Childrens"
^
SE$ "XXXX"
Æ í
íChristmas% 1 p
SF$ "Christmas"
^
SF$ "XXXX"
Æ í
íReligious% 1 p
SG$ "Religious"
^
SG$ "XXXX"
Æ í
íCD% 1 p
M1$ "Compact_Disk"
^
M1$ "X"
Æ í
íRecrd% 1 p
M2$ "Record"
^
M2$ "X"
Æ í
íCassette% 1 p
M3$ "Tape"
^
M3$ "X"
Æ í
íVideo% 1 p
M4$ "Video"
^
M4$ "X"
Æ í
íEightTrack% 1 p
M5$ "8-Track"
^
M5$ "X"
Æ í
íReelToReel% 1 p
M6$ "Reel-to-Reel"
^
M6$ "X"
Æ í
dtrstr1$ "01 01 " (datsm%,"z9999.")
datestart% 1(dtrstr1$)
dtrstr2$ "01 01 " (datlg%,"z9999.")
dateend% 1(dtrstr2$)
┤ Ö"audio"
íalbumdate% 0 p
╔ t
╨st.audio S1$
st.audio S2$
st.audio S3$
st.audio S4$
st.audio S5$
st.audio S6$
st.audio S7$
st.audio S8$
st.audio S9$
st.audio SA$
st.audio SB$
st.audio SC$
st.audio SE$
st.audio SF$
st.audio SG$
(source_name M1$ source_name M2$ source_name M3$ source_name M4$ source_name M5$ source_name M6$)
q Ö"tempqury"
^
╔ t
╨st.audio S1$
st.audio S2$
st.audio S3$
st.audio S4$
st.audio S5$
st.audio S6$
st.audio S7$
st.audio S8$
st.audio S9$
st.audio SA$
st.audio SB$
st.audio SC$
st.audio SE$
st.audio SF$
st.audio SG$
(source_name M1$ source_name M2$ source_name M3$ source_name M4$ source_name M5$ source_name M6$)
(date.audio datestart%) (date.audio dateend%)
q Ö"tempqury"
Æ í
albumt% A("audio")
å Ö"audio"
┤ Ö"tempqury"
albumq% A("tempqury")
å Ö"tempqury"
ísong_length% 1 p
lenstart$ "0." (sonsm%,"99.") ".0"
tstart% 8(lenstart$)
lenend$ "0." (sonlg%,"99.") ".0"
tend% 8(lenend$)
┤ Ö"tempqury"
╔ ` Ö"tempqury"
┤ Ö"Songs"
┤ Ö"tempqur2"
╛ a Ö"tempqur2"
╪ O B("tempqury")
special$ special_field.tempqury
╔ ╨ Ö"songs"(special_field.songs special$) (( 8(song_length.songs) tstart%) ( 8(song_length.songs) tend%))
╔ ` Ö"songs"
╪ O B("songs")
ü Ö"tempqur2"
song_name.tempqur2 song_name.songs
special_field.tempqur2 special_field.songs
Song_Number.tempqur2 Song_Number.songs
Song_Length.tempqur2 Song_Length.songs
╠ Ö"tempqur2"
╔ ▒ Ö"songs"
┘
╔ ▒ Ö"tempqury"
┘
songt% A("songs")
å Ö"songs"
songq% A("tempqur2")
å Ö"tempqur2"
Æ í
ísong_length% 0 p
íalbumq% 0 p
┬"No Records selected!","Do you want to try again?",130,ans%
íans% 1 p
wWideAreaH
^
wmloop
Æ í
Æ í
┤ £"albumqu2"
sel% 0
╪sel% 0
╧ ▀
┘
å Ö"tempqury"
^
ísongq% 0 p
┬"No Records selected!","Do you want to try again?",130,ans%
íans% 1 p
wWideAreaH
^
wmloop
Æ í
Æ í
┤ £"songqu2"
┤ Ö"tempqury"
sel% 0
╪sel% 0
ísel% 0 p
special3$ special_field.tempqur2
╔ ╨special_field.tempqury special3$
╔ ` Ö"tempqury"
AlbumName$ album_name.tempqury
GroupName$ group_name.tempqury
£ ╚
Æ í
╧ ▀
┘
å Ö"tempqury"
å Ö"tempqur2"
Æ í
sel% 1
wquryreturn
spanel:
│ _ wserror
err% 0
╩ ╦"Browse Mode activated, use STOP to exit."
spanel2:
╧ Γ
│ _ wferror
╔ ╨
íerr% 1 p é │
err% 0
╜ GOSUB sset
wfloop
serror: é e
┬ (( &),"",2,a%
err% 1
╔ £ Y: yspanel2
sset:
ík% 1 pckey$ fkey$$
ík% 2 pckey% fkey$$
ssearch:
╔ £ Ñind$$
ssearch2: ╜ loop until correct record found
ík% 1 p ífkey$$ ckey$ p ├
ík% 2 p ífkey$$ ckey% p ├
╔ £ ▒
wssearch2
fexit:
å Öf$
wmloop
ferror: ╜ general error trap
res% 0
╜ a% = ERRNO :A$ = STR$ (a%)
╜ REQUEST A$,"",139
í( & 11) (err% 11) p
res% 11
^ í & 57 p
┬"Record already exists with this key",""2,a%:res% 2
^ í & 50 p
res% 4
^ í( & 3) ( & 4) (err% 3) (err% 4) p
┬"Print Command Failed","Printer Off or Not On-Line",139
res% 5
^
┬ (( &),"Press OK to make another selection",114,a%: ía% 1 pres% 3
Æ í
íerr% 0 p
íerr% 1 perr% 0: wmloop
íerr% 3 perr% 0: wmloop
íerr% 4 perr% 0: ╔ £ `: wfloop
^
íres% 1 p y
íres% 2 p yfloop
íres% 3 p ymloop
íres% 4 p ╔ £ `: yfloop
íres% 5 p yVEB
íres% 11 p ymloop
Æ í
É